package com.hzw.saas.api.msg.query;

import javax.validation.constraints.NotBlank;

import com.hzw.saas.api.msg.enums.MsgType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 群组消息
 * </p>
 *
 * @author sonam
 * @since 2021/1/7 13:52
 */
@ApiModel("群组消息参数")
public class MsgGroupQuery extends MsgQuery {

    @Setter
    @Getter
    @ApiModelProperty(value = "发送目标id，可以是群组也可以是用户", required = true)
    private String to;

    @Setter
    @Getter
    @NotBlank(message = "群组id不能为空")
    @ApiModelProperty(value = "groupId", required = true)
    private String from;

    @Getter
    @ApiModelProperty(hidden = true)
    private int type = MsgType.GROUP_MSG.code();

    @Override
    public MsgType getMsgType() {
        return MsgType.GROUP_MSG;
    }
}
